home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / os2 / inadv095.zip / copyini.cmd < prev    next >
OS/2 REXX Batch file  |  1996-09-01  |  892b  |  40 lines

  1. /*
  2.  
  3.   REXX Script to copy Internet Adventurer settings from one .INI file to
  4.   to another
  5.  
  6. */
  7.  
  8. if RxFuncQuery('SysLoadFuncs') then do
  9.    call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  10.    call SysLoadFuncs
  11. end
  12.  
  13. parse upper arg from to
  14. if from = '' | to = '' then do
  15.    say "Syntax: COPYINI <from> <to>"
  16.    say "Where <from> = From .INI name (or OS2) for OS2.INI"
  17.    say "Where <to>   = To .INI name (or OS2) for OS2.INI"
  18.    say "Example: COPYINI inetadv.ini OS2"
  19.    exit
  20. end
  21.  
  22. say "Copying Internet Adventurer settings from" from "to" to
  23.  
  24. if from = 'OS2' then
  25.    from = 'USER'
  26. if to = 'OS2' then
  27.    to = 'USER'
  28.  
  29. APP = "Internet Adventurer"
  30.  
  31. call SysIni FROM, APP, 'All:', 'Keys'
  32. if Result \= 'ERROR:' then do
  33.    do i = 1 to Keys.0
  34.       val = SysIni(from, APP, Keys.i)
  35.       call SysIni to, APP, Keys.i, val
  36.    end
  37. end
  38.  
  39. say 'Copying completed'
  40.